﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage<GestionEducativa.Models.ReporteViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Gestión Educativa
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <a href="#" id="reporfac">Reporte de facturas</a> | <a href="#" id="reporrec">Reporte
        de recibos</a>
    <div id="formRep" style="padding: 20px">
    </div>
    <div style="text-align: right; padding-right: 20px">
        <a href="#" id="impri" onclick="$.jPrint('#cabecera', '#desfac'); return false;" >Imprimir reporte</a>
    </div>
    <div style="padding: 20px">
        <center id="desfac"></center>
    </div>
    <div id="colorboxCB">
    </div>
    <div id="cabecera">
            <h2>Sistema de Gestión Educativa</h2>
        </div>
</asp:Content>
<asp:Content ID="ScriptR" ContentPlaceHolderID="HeaderContent" runat="server">

    <script type="text/javascript">
        $(document).ready(function () {

            $('#impri').css('display', 'none');
            $('#cabecera').css('display', 'none');

            $('#reporfac').click(function () {
                $.ajax({
                    url: '<%:Url.Content("~/Reporte/GenerarReporteFactura")%>',
                    cache: false,
                    type: "GET",
                    dataType: "html",
                    success: function (html) {
                        $('#desfac').html('');
                        $('#impri').css('display', 'none');
                        $('#formRep').html(html)
                    }
                });
            });

            $('#reporrec').click(function () {
                $.ajax({
                    url: '<%:Url.Content("~/Reporte/GenerarReporteRecibo")%>',
                    cache: false,
                    type: "GET",
                    dataType: "html",
                    success: function (html) {
                        $('#desfac').html('');
                        $('#impri').css('display', 'none');
                        $('#formRep').html(html)
                    }
                });
            });

        });
    </script>
</asp:Content>
